import React from "react";
import actions from "./redux/actions";
import {connect} from "react-redux";
import get_sub_state from "./redux/get_sub_state";
import UI from "./List1";

class ListApp extends React.Component{
  constructor(props){
    super(props);
  }
  render(){
    return <div>
      <div style={{minwidth:50,float:"left"}}>
        <UI list={this.props.leftList} onSelect={(id)=>this.props.selectLeft(id)}/>
      </div>
      <div style={{float:"left"}}>
        <UI list={this.props.rightList} onSelect={(id)=>this.props.selectRight(id)}/>
      </div>

    </div>
  }
}
export default connect(get_sub_state, actions)(ListApp);
